
<ion-view  hide-nav-bar="true" hide-tabs="true" delegate-handle="messageDetailsScroll" >
  <style>
  .rj-stable-content {
        background-color: #EEE;}
    .rj-message-time {
        width: 100px;
        text-align: center;
        margin-bottom: 5px;
        color: #FFF;
        background-color: rgba(0, 0, 0, 0.2);
        font-size: 12px;
        margin-left: auto;
        border-radius:10px;
        margin-right: auto; }
    
    .rj-message-wrap {
        padding: 7px;
        overflow: auto;
        position: relative; }

    .rj-message-wrap .rj-head-pic,
    .rj-message-wrap .rj-head-pic-right {
        border-radius:40px;
        max-height: 40px;
        max-width: 40px; }

    .rj-message-wrap .rj-head-pic {
        float: left; }

    .rj-message-wrap .rj-head-pic-right {
        float: right; }
    .rj-message-wrap .rj-message,
    .rj-message-wrap .rj-message-right {
        padding: 6px 8px;
        line-height: 26px;
        max-width: 190px;
        font-size:16px;
        border-radius: 5px; }
    .rj-message-wrap .rj-message {
        float: left;
        margin-left: 16px;
        color:white;
        background-color: #6495ED; }
    .rj-message-wrap .rj-message-right {
        float: right;
        margin-right: 16px;
        background-color: rgba(250,200,200,.9); }
    .rj-message-wrap .rj-triangle-left,
    .rj-message-wrap .rj-triangle-right {
        display: inline-block;
        width: 0px;
        height: 0px;
        position: absolute;
        border-width: 8px 10px;
        border-style: solid;
        top: 17px; }
    .rj-message-wrap .rj-triangle-left {
        left: 44px;
        border-color: transparent 	#6495ED transparent transparent; }
    .rj-message-wrap .rj-triangle-right {
        right: 44px;
        border-color: transparent transparent transparent rgba(250,200,200,.9); }
</style>
<ion-header-bar class="bar bar-header item-input-inset hh_search" style="margin:0;padding:0;border:none;background:none">
        <button ng-click="goBack()" style="color:black;" class="button button-clear pull-left">
		   <i class="icon ion-ios-arrow-back"></i>
            返回
        </button> 
		    <h1 class="title">聊一聊</h1>
    </ion-header-bar>
  <div style="position:fixed;width:100%;height:55px;z-index:999;margin-top:-1px;">
         <div style="width:100%;height:55px;display:flex;flex-direction:row;border-bottom:solid 1px #E6E6FA;align-items:center;background:#eee;">
            <img src="img/adam.jpg" width="44" height="44" style="border-radius:44px;margin-left:10px;">
            <img src="img/ben.png" width="44" height="44" style="border-radius:44px;margin-left:10px;">
        </div>
  </div>
  <ion-content scroll="" class="padding" style="padding-top:80px;background-color: #EEE;">
        <ion-refresher pulling-text="正在加载..." on-refresh="doRefresh()" pulling-icon=""></ion-refresher>
     <ion-list style="height:400px;width:100%;padding-top:60px; ">
        <div ng-repeat="item in msgs">
          <p class="rj-message-time">{{item.sendTime}}</p>
            <div class="rj-message-wrap" ng-if="!item.isFromMe" picsrc="{{item.headImgUrl}}">
                <img ng-src="{{item.headImgUrl}}" err-src="img/ben.png" class="rj-head-pic"  />
                <span class="rj-triangle-left"></span>
                <p class="rj-message">{{item.content}}</p>
                <!--<p class="rj-message"><img ng-src="{{item.picurl}}" witdh=100 height=100 /></p>-->
            </div>
            <div class="rj-message-wrap" ng-if="item.isFromMe"  picsrc="{{item.headImgUrl}}" pic-on-hold>
                 <!--<div class="rj-message-wrap" ng-if="!item.isFromeMe"  picsrc="{{item.picurl}}" pic-on-hold>-->
                <img ng-src="{{item.headImgUrl}}" err-src="img/ben.png" class="rj-head-pic-right">
                <span class="rj-triangle-right"></span>
                <p class="rj-message-right">{{item.content}}</p>
            </div>
        </div>
        <div style="width:40px;height:10px;"></div>
     </ion-list>
  </ion-content>
    <div style="height:44px;width:100%;position: fixed;bottom:0;padding:0 15px 0 15px;display:flex;flex-direction:row;align-items:center;background:#eee">
      <input type="text" maxlength="145" style="flex:8;height:38px;border-radius:5px;font-size:16px;" ng-model="msg" / >
      <button style="flex:1;height:38px;margin-left:10px;border-radius:5px;color:white;background:#04BE02;" ng-click="sendMsg(msg)" class="button-clear">发送</button>
    </div>
</ion-view>
